# -*- coding:utf-8 -*-
# Created by Jin(jinzhencheng@outlook.com) at 2018/8/1 14:50

from sqlalchemy import Column
from sqlalchemy import String
from sqlalchemy import DateTime
from sqlalchemy import Integer
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()


class Category(Base):
    __tablename__ = "category"
    id = Column(Integer, primary_key=True)
    name = Column(String)
    is_valid = Column(Integer)


class Article(Base):
    __tablename__ = "article"
    id = Column(Integer, primary_key=True)
    title = Column(String)
    publish_time = Column(String)
    update_time = Column(DateTime)
    add_time = Column(DateTime)
    src = Column(String)
    view = Column(Integer)
    comment = Column(Integer)
    baijiahao_id = Column(Integer)
    article_id = Column(String)


class BaiJiaHao(Base):
    __tablename__ = "baijiahao"
    id = Column(Integer, primary_key=True)
    name = Column(String)
    app_id = Column(String)
    add_time = Column(DateTime)
    update_time = Column(DateTime)
    is_valid = Column(Integer)
    fans = Column(String)
    follow = Column(String)
    description = Column(String)
    remark = Column(String)
    home_url = Column(String)
    category = Column(String)


class HotNews(Base):
    __tablename__ = "hot_news"
    id = Column(Integer, primary_key=True)
    title = Column(String)
    title_src = Column(String)
    type = Column(String)
    type_src = Column(String)
    add_time = Column(DateTime)
    trend = Column(String)
    search_count = Column(Integer)
    is_valid = Column(Integer)

